#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() 
{
	int x = 0;
	int y = 0;
	while (scanf("%d %d", &x, &y) == 2)
	{
		printf("%d\n", x / y);
		printf("%d\n", x % y);
	}
	return 0;
}